package com.example.back.controller.ads;

import com.example.back.bean.ads.AdsInfo;
import com.example.back.dao.ads.AdsDao;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/ads")
public class AdsInfoController {

    @Autowired
    private AdsDao adsDao;

    @RequestMapping("/allInfo")
    public List<AdsInfo> getAllAdsInfo(){
        return adsDao.getAllAdsInfo();
    }

    @RequestMapping("/test")
    public String test(String name){
        System.out.println(name);
        return "{ \"isValid\" : \"true \" }";
    }

}
